package com.ruoyi;

import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.project.app.controller.LogWrite;
import com.ruoyi.project.mq.DelaySender;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.io.File;
import java.util.Date;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

/**
 * 启动程序
 *
 * @author ruoyi
 */
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableScheduling
@EnableTransactionManagement
public class RuoYiApplication {
    public static void main(String[] args) {

//      设置指定键对值的系统属性
        System.setProperty("es.set.netty.runtime.available.processors", "false");
        System.setProperty("spring.devtools.restart.enabled", "false");
        SpringApplication.run(RuoYiApplication.class, args);
        System.out.println("(♥◠‿◠)ﾉﾞ  若依启动成功   ლ(´ڡ`ლ)ﾞ  \n");


//        JSONObject jsonObject = new JSONObject();
//        jsonObject.put("mobile","18595593187");
//        jsonObject.put("time", DateUtil.formatDateTime(new Date()));
//        jsonObject.put("place","看看结果如何");
//
//        String msg = jsonObject.toJSONString();
//        DelaySender.send(msg,5*1000);
//        System.out.println("5秒后执行发送消息操作");


    }
}
